#!/usr/bin/env python
# encoding:utf-8
# cython: language_level=3
import hashlib


def encryption(text, type):

    if type == "小写":
        my_hash = hashlib.md5()
        my_hash.update(text)
        return {"status": 0, "result": my_hash.hexdigest()}
    else:
        my_hash = hashlib.md5()
        my_hash.update(text)
        return {"status": 0, "result": my_hash.hexdigest().upper()}
